package ejb.dto;

import java.util.List;

import org.primefaces.model.UploadedFile;



public class ExcursionDTO {
	
	private int id;
	private String description;
	private LocationDTO location;
	private String name;
	private float price;
	private List<ExcursionAvailabilityDTO> excursionAvailabilities;
	private int locationId;
	private UploadedFile image;
	
	private String extra;
	private String reservationInfo;
	

	//GETTER AND SETTER
	
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDescription() {
		return this.description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public LocationDTO getLocation() {
		return this.location;
	}

	public void setLocation(LocationDTO location) {
		this.location = location;
	}

	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public float getPrice() {
		return this.price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public List<ExcursionAvailabilityDTO> getExcursionAvailabilities() {
		return this.excursionAvailabilities;
	}

	public void setExcursionAvailabilities(List<ExcursionAvailabilityDTO> excursionAvailabilities) {
		this.excursionAvailabilities = excursionAvailabilities;
	}

	public int getLocationId() {
		return locationId;
	}

	public void setLocationId(int locationId) {
		this.locationId = locationId;
	}

	public String getExtra() {
		return extra;
	}

	public void setExtra(String extra) {
		this.extra = extra;
	}

	public String getReservationInfo() {
		return reservationInfo;
	}

	public void setReservationInfo(String reservationInfo) {
		this.reservationInfo = reservationInfo;
	}

	public UploadedFile getImage() {
		return image;
	}

	public void setImage(UploadedFile image) {
		this.image = image;
	}
	
	//METHODS
	
	/**
	 * Add ExcursionAvailabilityDTO to list
	 * @param excursionAvailability
	 * @return list of ExcursionAvailabilityDTO
	 */
	public ExcursionAvailabilityDTO addExcursionAvailability(ExcursionAvailabilityDTO excursionAvailability) {
		getExcursionAvailabilities().add(excursionAvailability);
		excursionAvailability.setExcursion(this);

		return excursionAvailability;
	}

	/**
	 * Remove ExcursionAvailabilityDTO from list
	 * @param excursionAvailability
	 * @return list of ExcursionAvailabilityDTO
	 */
	public ExcursionAvailabilityDTO removeExcursionAvailability(ExcursionAvailabilityDTO excursionAvailability) {
		getExcursionAvailabilities().remove(excursionAvailability);
		excursionAvailability.setExcursion(null);

		return excursionAvailability;
	}

}